package entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 前端响应实体类.
 *
 * @author 宫新程
 * @since 2019/3/2 0:24
 */
@Data
public class Result implements Serializable {

  private boolean flag;
  private Integer code;
  private String message;
  private Object data;

  public Result() {}

  public Result(boolean flag, Integer code, String message) {
    this.flag = flag;
    this.code = code;
    this.message = message;
  }

  public Result(boolean flag, Integer code, String message, Object data) {
    this.flag = flag;
    this.code = code;
    this.message = message;
    this.data = data;
  }
}
